package cn.tedu.controller;

import cn.tedu.pojo.Rights;
import cn.tedu.service.RightsService;
import cn.tedu.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/rights")
public class RightsController {
    @Autowired
    private RightsService rightsSerive;
    @GetMapping("/getRightsList")
    public SysResult getRightsList(){
        List<Rights> rights = rightsSerive.getRightsList();
        return SysResult.success(rights);
    }
}
